#!/bin/bash
# 检查主机是否在线
if ping -c 1 -W 1 $1 &> /dev/null; then
    echo "Host $1 is On-line."
else
    echo "Host $1 is Off-line."
fi
